// pages/auth/index.js

import {request} from '../../request/index.js';
import regeneratorRuntime from '../../lib/runtime/runtime.js';
import {login} from '../../utils/asyncWx.js'
Page({

  /**
   * 页面的初始数据
   */
  data: {

  },
  //  获取授权
 async getUserInfo(e){
    // console.log(e)
    const {encryptedData,iv,rawData,signature} = e.detail;
    const {code} = await login();
    const reqParams = {encryptedData,iv,rawData,signature,code}
    const res = await request({url:'/users/wxlogin',method: "post",data:reqParams});
    console.log(res)
      
  }

})